<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>音乐品味测试 - 发现你的音乐偏好</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #6366f1;
            --primary-light: #a5b4fc;
            --primary-dark: #4338ca;
            --secondary: #10b981;
            --accent: #f97316;
            --danger: #ef4444;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --bg-light: #f3f4f6;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 12px;
            --shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 55px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 55px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
            box-shadow: var(--shadow);
        }
        
        .nav-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--primary-dark);
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 测试头部 */
        .quiz-header {
            background-color: var(--bg-white);
            padding: 15px;
        }
        
        .quiz-banner {
            width: 100%;
            height: 180px;
            border-radius: var(--radius);
            overflow: hidden;
            margin-bottom: 15px;
        }
        
        .quiz-banner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .quiz-category {
            display: inline-block;
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            font-size: 0.75rem;
            padding: 3px 10px;
            border-radius: 12px;
            margin-bottom: 8px;
        }
        
        .quiz-title {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 10px;
            line-height: 1.4;
        }
        
        .quiz-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            font-size: 0.85rem;
            color: var(--text-light);
            margin-bottom: 15px;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .quiz-description {
            font-size: 0.95rem;
            line-height: 1.6;
            color: var(--text-secondary);
            margin-bottom: 15px;
        }
        
        /* 测试进度 */
        .quiz-progress-container {
            padding: 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            border-bottom: 1px solid var(--border-light);
        }
        
        .progress-bar-container {
            height: 8px;
            background-color: var(--bg-light);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 8px;
        }
        
        .progress-bar {
            height: 100%;
            background-color: var(--primary);
            border-radius: 4px;
        }
        
        .progress-text {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--text-light);
        }
        
        /* 操作按钮 */
        .action-buttons {
            display: flex;
            gap: 10px;
            padding: 15px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .primary-btn {
            flex: 1;
            padding: 12px 0;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .primary-btn:hover {
            background-color: var(--primary-dark);
        }
        
        .secondary-btn {
            padding: 12px;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .secondary-btn:hover {
            background-color: #e5e7eb;
        }
        
        /* 内容标签 */
        .content-tabs {
            display: flex;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .tab-item {
            flex: 1;
            padding: 15px 0;
            text-align: center;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
            position: relative;
        }
        
        .tab-item.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }
        
        .tab-badge {
            position: absolute;
            top: 8px;
            right: 25%;
            background-color: var(--danger);
            color: white;
            font-size: 0.7rem;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 测试内容区 */
        .tab-content {
            padding: 15px;
            background-color: var(--bg-white);
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* 题目样式 */
        .question-item {
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .question-number {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--primary);
        }
        
        .question-text {
            font-size: 1.05rem;
            margin-bottom: 15px;
            line-height: 1.5;
        }
        
        .options-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .option-item {
            padding: 12px 15px;
            border: 1px solid var(--border-light);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .option-item:hover {
            border-color: var(--primary-light);
            background-color: rgba(99, 102, 241, 0.05);
        }
        
        .option-item.selected {
            border-color: var(--primary);
            background-color: rgba(99, 102, 241, 0.1);
        }
        
        .option-icon {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .option-item.selected .option-icon {
            background-color: var(--primary);
            border-color: var(--primary);
            color: white;
        }
        
        /* 评论区 */
        .comments-container {
            padding: 15px;
            background-color: var(--bg-white);
        }
        
        .comment-input-container {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .comment-input {
            flex: 1;
            padding: 12px 15px;
            border: 1px solid var(--border-light);
            border-radius: 20px;
            background-color: var(--bg-light);
            font-size: 0.9rem;
        }
        
        .comment-input:focus {
            outline: none;
            border-color: var(--primary-light);
        }
        
        .comment-btn {
            padding: 0 15px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 0.9rem;
        }
        
        .comments-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .comment-item {
            display: flex;
            gap: 10px;
        }
        
        .comment-content {
            flex: 1;
        }
        
        .comment-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
        }
        
        .user-name {
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .comment-time {
            font-size: 0.75rem;
            color: var(--text-light);
        }
        
        .comment-text {
            font-size: 0.9rem;
            margin-bottom: 8px;
            line-height: 1.5;
        }
        
        .comment-actions {
            display: flex;
            gap: 15px;
            font-size: 0.8rem;
        }
        
        .comment-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        
        .comment-action.liked {
            color: var(--danger);
        }
        
        /* 回复区 */
        .replies-container {
            margin-top: 10px;
            margin-left: 40px;
            padding-left: 10px;
            border-left: 1px dashed var(--border-light);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .reply-item {
            display: flex;
            gap: 10px;
        }
        
        .reply-content {
            flex: 1;
        }
        
        .reply-text {
            font-size: 0.85rem;
            background-color: var(--bg-light);
            padding: 8px 12px;
            border-radius: 12px;
            margin-bottom: 5px;
        }
        
        .reply-text .reply-to {
            color: var(--primary);
            font-weight: 500;
        }
        
        /* 相关推荐 */
        .related-quizzes {
            padding: 15px;
            background-color: var(--bg-white);
            margin-top: 10px;
        }
        
        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 15px;
        }
        
        .related-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .related-item {
            display: flex;
            gap: 12px;
        }
        
        .related-image {
            width: 80px;
            height: 80px;
            border-radius: 8px;
            object-fit: cover;
        }
        
        .related-info {
            flex: 1;
            overflow: hidden;
        }
        
        .related-title {
            font-size: 0.95rem;
            font-weight: 500;
            margin-bottom: 5px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.4;
        }
        
        .related-meta {
            font-size: 0.75rem;
            color: var(--text-light);
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 65px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            text-decoration: none;
        }
        
        .nav-item i {
            font-size: 1.3rem;
            margin-bottom: 3px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        /* 提示消息 */
        .toast-notification {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.9rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast-notification.show {
            opacity: 1;
        }
        
        /* 加载更多评论 */
        .load-more-comments {
            width: 100%;
            padding: 10px;
            margin: 10px 0 0;
            background-color: var(--bg-light);
            border: none;
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">测试详情</div>
        <button class="nav-action">
            <i class="fas fa-share-alt"></i>
        </button>
    </div>
    
    <!-- 测试头部信息 -->
    <div class="quiz-header">
        <div class="quiz-banner">
            <img src="https://picsum.photos/id/1068/800/400" alt="音乐测试封面">
        </div>
        
        <span class="quiz-category">音乐</span>
        <h1 class="quiz-title">根据你的听歌习惯，测试你的音乐品味类型</h1>
        
        <div class="quiz-meta">
            <div class="meta-item">
                <i class="fas fa-question-circle"></i>
                <span>15题</span>
            </div>
            <div class="meta-item">
                <i class="fas fa-users"></i>
                <span>8.7k人参与</span>
            </div>
            <div class="meta-item">
                <i class="fas fa-star"></i>
                <span>4.9分</span>
            </div>
            <div class="meta-item">
                <i class="fas fa-clock"></i>
                <span>5分钟</span>
            </div>
        </div>
        
        <p class="quiz-description">这个测试将通过你对不同音乐风格的偏好、听歌时间、听歌场景等多个维度，分析你的音乐品味类型，并推荐适合你的新歌单和艺术家。测试结果将以可视化方式呈现，帮助你更好地了解自己的音乐偏好。</p>
    </div>
    
    <!-- 测试进度 -->
    <div class="quiz-progress-container">
        <div class="progress-bar-container">
            <div class="progress-bar" style="width: 20%"></div>
        </div>
        <div class="progress-text">
            <span>已完成3/15题</span>
            <span>20%</span>
        </div>
    </div>
    
    <!-- 操作按钮 -->
    <div class="action-buttons">
        <button class="primary-btn">
            <i class="fas fa-redo"></i> 继续测试
        </button>
        <button class="secondary-btn favorite-btn">
            <i class="far fa-bookmark"></i>
            <span>收藏</span>
        </button>
        <button class="secondary-btn">
            <i class="far fa-heart"></i>
            <span>喜欢</span>
        </button>
    </div>
    
    <!-- 内容标签 -->
    <div class="content-tabs">
        <div class="tab-item active" data-tab="questions">题目</div>
        <div class="tab-item" data-tab="comments">
            评论
            <span class="tab-badge">28</span>
        </div>
        <div class="tab-item" data-tab="related">相关推荐</div>
    </div>
    
    <!-- 题目内容区 -->
    <div class="tab-content active" id="questions">
        <!-- 当前题目 -->
        <div class="question-item">
            <div class="question-number">第4题 / 共15题</div>
            <div class="question-text">你通常在什么时间段听歌？</div>
            <div class="options-container">
                <div class="option-item">
                    <div class="option-icon">A</div>
                    <div class="option-text">早晨，起床后或通勤时</div>
                </div>
                <div class="option-item selected">
                    <div class="option-icon"><i class="fas fa-check"></i></div>
                    <div class="option-text">下午，工作或学习间隙</div>
                </div>
                <div class="option-item">
                    <div class="option-icon">C</div>
                    <div class="option-text">晚上，放松或睡前</div>
                </div>
                <div class="option-item">
                    <div class="option-icon">D</div>
                    <div class="option-text">没有固定时间，随时想听就听</div>
                </div>
            </div>
        </div>
        
        <!-- 下一题预览 -->
        <div class="question-item">
            <div class="question-number">第5题 / 共15题</div>
            <div class="question-text">当你情绪低落时，你倾向于听什么样的音乐？</div>
            <div class="options-container">
                <div class="option-item">
                    <div class="option-icon">A</div>
                    <div class="option-text">悲伤的音乐，与自己的情绪共鸣</div>
                </div>
                <div class="option-item">
                    <div class="option-icon">B</div>
                    <div class="option-text">欢快的音乐，试图改变心情</div>
                </div>
                <div class="option-item">
                    <div class="option-icon">C</div>
                    <div class="option-text">舒缓的音乐，如古典或轻音乐</div>
                </div>
                <div class="option-item">
                    <div class="option-icon">D</div>
                    <div class="option-text">激烈的音乐，如摇滚或电子音乐</div>
                </div>
            </div>
        </div>
        
        <!-- 题目导航 -->
        <div class="d-flex justify-content-between mt-3">
            <button class="secondary-btn">
                <i class="fas fa-arrow-left"></i> 上一题
            </button>
            <button class="primary-btn">
                下一题 <i class="fas fa-arrow-right"></i>
            </button>
        </div>
    </div>
    
    <!-- 评论内容区 -->
    <div class="tab-content" id="comments">
        <div class="comments-container">
            <!-- 评论输入 -->
            <div class="comment-input-container">
                <img src="https://picsum.photos/id/64/100/100" alt="用户头像" class="user-avatar">
                <input type="text" class="comment-input" placeholder="分享你的测试体验...">
                <button class="comment-btn">发送</button>
            </div>
            
            <!-- 评论列表 -->
            <div class="comments-list">
                <!-- 评论1 -->
                <div class="comment-item">
                    <img src="https://picsum.photos/id/91/100/100" alt="用户头像" class="user-avatar">
                    <div class="comment-content">
                        <div class="comment-header">
                            <span class="user-name">音乐爱好者</span>
                            <span class="comment-time">2小时前</span>
                        </div>
                        <div class="comment-text">这个测试太准了！结果说我是独立音乐爱好者，确实我最近一直在听独立乐队的歌，推荐的歌单也很合我口味。</div>
                        <div class="comment-actions">
                            <button class="comment-action liked">
                                <i class="fas fa-heart"></i> 42
                            </button>
                            <button class="comment-action reply-btn">
                                <i class="fas fa-reply"></i> 回复
                            </button>
                        </div>
                        
                        <!-- 回复列表 -->
                        <div class="replies-container">
                            <div class="reply-item">
                                <img src="https://picsum.photos/id/22/100/100" alt="用户头像" class="user-avatar">
                                <div class="reply-content">
                                    <div class="comment-header">
                                        <span class="user-name">独立音乐迷</span>
                                        <span class="comment-time">1小时前</span>
                                    </div>
                                    <div class="reply-text">
                                        <span class="reply-to">@音乐爱好者</span> 你最喜欢哪个独立乐队？我最近很喜欢告五人。
                                    </div>
                                    <div class="comment-actions">
                                        <button class="comment-action">
                                            <i class="far fa-heart"></i> 8
                                        </button>
                                        <button class="comment-action reply-btn">
                                            <i class="fas fa-reply"></i> 回复
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 评论2 -->
                <div class="comment-item">
                    <img src="https://picsum.photos/id/65/100/100" alt="用户头像" class="user-avatar">
                    <div class="comment-content">
                        <div class="comment-header">
                            <span class="user-name">深夜听歌人</span>
                            <span class="comment-time">昨天</span>
                        </div>
                        <div class="comment-text">问题设计得很用心，不仅考虑了音乐类型，还涉及到听歌场景和情绪因素，比其他测试更全面。</div>
                        <div class="comment-actions">
                            <button class="comment-action">
                                <i class="far fa-heart"></i> 26
                            </button>
                            <button class="comment-action reply-btn">
                                <i class="fas fa-reply"></i> 回复
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 评论3 -->
                <div class="comment-item">
                    <img src="https://picsum.photos/id/29/100/100" alt="用户头像" class="user-avatar">
                    <div class="comment-content">
                        <div class="comment-header">
                            <span class="user-name">古典音乐迷</span>
                            <span class="comment-time">3天前</span>
                        </div>
                        <div class="comment-text">希望能增加更多关于古典音乐的选项，目前的选项更多偏向流行音乐。</div>
                        <div class="comment-actions">
                            <button class="comment-action">
                                <i class="far fa-heart"></i> 15
                            </button>
                            <button class="comment-action reply-btn">
                                <i class="fas fa-reply"></i> 回复
                            </button>
                        </div>
                        
                        <!-- 回复列表 -->
                        <div class="replies-container">
                            <div class="reply-item">
                                <img src="https://picsum.photos/id/1/100/100" alt="用户头像" class="user-avatar">
                                <div class="reply-content">
                                    <div class="comment-header">
                                        <span class="user-name">管理员</span>
                                        <span class="comment-time">2天前</span>
                                    </div>
                                    <div class="reply-text">
                                        <span class="reply-to">@古典音乐迷</span> 感谢建议！我们正在准备专门的古典音乐测试，敬请期待。
                                    </div>
                                    <div class="comment-actions">
                                        <button class="comment-action">
                                            <i class="far fa-heart"></i> 9
                                        </button>
                                        <button class="comment-action reply-btn">
                                            <i class="fas fa-reply"></i> 回复
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 加载更多评论 -->
            <button class="load-more-comments">
                <i class="fas fa-spinner fa-spin"></i> 加载更多评论
            </button>
        </div>
    </div>
    
    <!-- 相关推荐区 -->
    <div class="tab-content" id="related">
        <div class="related-quizzes">
            <h3 class="section-title">相关测试</h3>
            <div class="related-list">
                <div class="related-item">
                    <img src="https://picsum.photos/id/292/200/200" alt="测试封面" class="related-image">
                    <div class="related-info">
                        <div class="related-title">从你喜欢的歌词看你的性格特质</div>
                        <div class="related-meta">
                            <span>12题</span> · <span>4.7分</span> · <span>音乐</span>
                        </div>
                    </div>
                </div>
                
                <div class="related-item">
                    <img src="https://picsum.photos/id/111/200/200" alt="测试封面" class="related-image">
                    <div class="related-info">
                        <div class="related-title">你适合成为音乐制作人吗？音乐天赋测试</div>
                        <div class="related-meta">
                            <span>20题</span> · <span>4.8分</span> · <span>音乐</span>
                        </div>
                    </div>
                </div>
                
                <div class="related-item">
                    <img src="https://picsum.photos/id/431/200/200" alt="测试封面" class="related-image">
                    <div class="related-info">
                        <div class="related-title">根据音乐品味匹配你的理想旅行目的地</div>
                        <div class="related-meta">
                            <span>15题</span> · <span>4.6分</span> · <span>音乐 · 旅行</span>
                        </div>
                    </div>
                </div>
                
                <div class="related-item">
                    <img src="https://picsum.photos/id/488/200/200" alt="测试封面" class="related-image">
                    <div class="related-info">
                        <div class="related-title">不同年代的音乐测试，你属于哪个音乐时代？</div>
                        <div class="related-meta">
                            <span>18题</span> · <span>4.9分</span> · <span>音乐</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-clipboard-check"></i>
            <span>测试</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-compass"></i>
            <span>发现</span>
        </a>
        <a href="#" class="nav-item">
            <i class="far fa-user"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 标签切换
        const tabItems = document.querySelectorAll('.tab-item');
        const tabContents = document.querySelectorAll('.tab-content');
        
        tabItems.forEach(item => {
            item.addEventListener('click', () => {
                // 移除所有active类
                tabItems.forEach(i => i.classList.remove('active'));
                tabContents.forEach(c => c.classList.remove('active'));
                
                // 为当前点击项添加active类
                item.classList.add('active');
                const tabId = item.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // 选项选择
        const optionItems = document.querySelectorAll('.option-item');
        optionItems.forEach(item => {
            item.addEventListener('click', () => {
                // 获取同一题目的所有选项
                const parent = item.closest('.options-container');
                const siblings = parent.querySelectorAll('.option-item');
                
                // 移除其他选项的选中状态
                siblings.forEach(sib => {
                    sib.classList.remove('selected');
                    const icon = sib.querySelector('.option-icon');
                    icon.innerHTML = icon.textContent; // 恢复为字母
                });
                
                // 设置当前选项为选中状态
                item.classList.add('selected');
                const icon = item.querySelector('.option-icon');
                icon.innerHTML = '<i class="fas fa-check"></i>';
            });
        });
        
        // 收藏功能
        const favoriteBtn = document.querySelector('.favorite-btn');
        favoriteBtn.addEventListener('click', () => {
            const icon = favoriteBtn.querySelector('i');
            
            if (icon.classList.contains('far')) {
                icon.classList.remove('far');
                icon.classList.add('fas');
                icon.style.color = '#6366f1';
                showToast('收藏成功');
            } else {
                icon.classList.remove('fas');
                icon.classList.add('far');
                icon.style.color = '';
                showToast('取消收藏');
            }
        });
        
        // 喜欢功能
        const likeBtn = document.querySelector('.action-buttons .secondary-btn:nth-child(3)');
        likeBtn.addEventListener('click', () => {
            const icon = likeBtn.querySelector('i');
            
            if (icon.classList.contains('far')) {
                icon.classList.remove('far');
                icon.classList.add('fas');
                icon.style.color = '#ef4444';
                showToast('喜欢成功');
            } else {
                icon.classList.remove('fas');
                icon.classList.add('far');
                icon.style.color = '';
                showToast('取消喜欢');
            }
        });
        
        // 评论点赞
        const commentLikeBtns = document.querySelectorAll('.comment-action:not(.reply-btn)');
        commentLikeBtns.forEach(btn => {
            btn.addEventListener('click', () => {
                btn.classList.toggle('liked');
                const icon = btn.querySelector('i');
                
                if (btn.classList.contains('liked')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    // 更新点赞数
                    const countText = btn.childNodes[2].textContent.trim();
                    const count = parseInt(countText) + 1;
                    btn.childNodes[2].textContent = ` ${count}`;
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    // 更新点赞数
                    const countText = btn.childNodes[2].textContent.trim();
                    const count = parseInt(countText) - 1;
                    btn.childNodes[2].textContent = ` ${count}`;
                }
            });
        });
        
        // 回复功能
        const replyBtns = document.querySelectorAll('.reply-btn');
        replyBtns.forEach(btn => {
            btn.addEventListener('click', () => {
                const commentItem = btn.closest('.comment-content, .reply-content');
                const userName = commentItem.querySelector('.user-name').textContent;
                
                // 聚焦到评论输入框并填充@用户名
                const commentInput = document.querySelector('.comment-input');
                commentInput.value = `@${userName} `;
                commentInput.focus();
                
                // 滚动到评论输入框
                commentInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
            });
        });
        
        // 发送评论
        const commentBtn = document.querySelector('.comment-btn');
        commentBtn.addEventListener('click', () => {
            const commentInput = document.querySelector('.comment-input');
            const commentText = commentInput.value.trim();
            
            if (commentText) {
                showToast('评论发送成功');
                commentInput.value = '';
                
                // 这里可以添加新评论到列表的逻辑
            } else {
                showToast('请输入评论内容');
            }
        });
        
        // 加载更多评论
        document.querySelector('.load-more-comments').addEventListener('click', function() {
            const btn = this;
            const originalText = btn.innerHTML;
            btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 加载中...';
            btn.disabled = true;
            
            // 模拟加载延迟
            setTimeout(() => {
                btn.innerHTML = originalText;
                btn.disabled = false;
                showToast('已加载更多评论');
                // 实际应用中这里会加载并添加更多评论
            }, 1500);
        });
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', () => {
            showToast('返回测试列表');
            // 实际应用中，这里会返回上一页
        });
        
        // 分享按钮
        document.querySelector('.top-nav .nav-action:last-child').addEventListener('click', () => {
            showToast('分享功能已打开');
            // 实际应用中，这里会打开分享选项
        });
        
        // 提示消息
        function showToast(message) {
            // 检查是否已有toast
            let toast = document.querySelector('.toast-notification');
            if (toast) {
                toast.remove();
            }
            
            // 创建新toast
            toast = document.createElement('div');
            toast.className = 'toast-notification';
            toast.textContent = message;
            
            document.body.appendChild(toast);
            
            // 显示toast
            setTimeout(() => {
                toast.classList.add('show');
            }, 10);
            
            // 3秒后隐藏并移除
            setTimeout(() => {
                toast.classList.remove('show');
                setTimeout(() => toast.remove(), 300);
            }, 3000);
        }
    </script>
</body>
</html>

